package com.dmbjz.configDemo;

import com.dmbjz.configDemo.pojo.Person;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ConfigDemoApplication {

    public static void main(String[] args) {

        ConfigurableApplicationContext ioc = SpringApplication.run(ConfigDemoApplication.class, args);

        //获取配置文件绑定数据
        Person person = ioc.getBean(Person.class);
        System.out.println(person);

        //获取文本内容
        String info2 = person.getChild().getText().get(2);
        System.out.println("文本|内容：" + info2);

    }

}
